<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>spips: xspips_tpm_polled_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">spips
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xspips__tpm__polled__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xspips_tpm_polled_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a design example using the SPI driver (<a class="el" href="struct_x_spi_ps.html" title="The XSpiPs driver instance data. ">XSpiPs</a>) in polled mode and hardware device with a Trusted Platform Module device. </p>
<p>This example sends TPM commands to device based on user inputs and displays the response. </p>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<p>None.</p>
<pre>
 MODIFICATION HISTORY:</pre><pre> Ver   Who  Date     Changes
</p>
<hr/>
<p>
 1.00  sg  04/02/21 Initial release
 3.9   sb  07/05/23 Added support for system device-tree flow.</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a14aaa93ae5aa83badddfb375e66a7c6e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#a14aaa93ae5aa83badddfb375e66a7c6e">SpiPsReadID</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiPtr)</td></tr>
<tr class="memdesc:a14aaa93ae5aa83badddfb375e66a7c6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads vendor identification information.  <a href="#a14aaa93ae5aa83badddfb375e66a7c6e">More...</a><br/></td></tr>
<tr class="separator:a14aaa93ae5aa83badddfb375e66a7c6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf6b46685d48c16faabf01f702d2cec8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#abf6b46685d48c16faabf01f702d2cec8">SpiPsTpmStatusGet</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiPtr, u8 *StatusPtr)</td></tr>
<tr class="memdesc:abf6b46685d48c16faabf01f702d2cec8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function gets TPM status.  <a href="#abf6b46685d48c16faabf01f702d2cec8">More...</a><br/></td></tr>
<tr class="separator:abf6b46685d48c16faabf01f702d2cec8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4fe32c1f6365d4586448ea929b5282d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#ad4fe32c1f6365d4586448ea929b5282d">SpiPsTpmStatusSet</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiPtr, u8 StatusVal)</td></tr>
<tr class="memdesc:ad4fe32c1f6365d4586448ea929b5282d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the TPM status.  <a href="#ad4fe32c1f6365d4586448ea929b5282d">More...</a><br/></td></tr>
<tr class="separator:ad4fe32c1f6365d4586448ea929b5282d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5859038bd418dcf96c9e3421023bb31d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#a5859038bd418dcf96c9e3421023bb31d">SpiPsTpmAccessGet</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiPtr, u8 *AccessPtr)</td></tr>
<tr class="memdesc:a5859038bd418dcf96c9e3421023bb31d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function gets TPM access configuration.  <a href="#a5859038bd418dcf96c9e3421023bb31d">More...</a><br/></td></tr>
<tr class="separator:a5859038bd418dcf96c9e3421023bb31d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b9ebbd5db2404596e8b66443ad5bd17"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#a3b9ebbd5db2404596e8b66443ad5bd17">SpiPsTpmAccessSet</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiPtr, u8 Access)</td></tr>
<tr class="memdesc:a3b9ebbd5db2404596e8b66443ad5bd17"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets TPM access configuration.  <a href="#a3b9ebbd5db2404596e8b66443ad5bd17">More...</a><br/></td></tr>
<tr class="separator:a3b9ebbd5db2404596e8b66443ad5bd17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae1089233ca34dffe91aee8b4c7756fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#aae1089233ca34dffe91aee8b4c7756fe">SpiPsTpmFifoRead</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiPtr, u8 *DataPtr, u8 ByteCount)</td></tr>
<tr class="memdesc:aae1089233ca34dffe91aee8b4c7756fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads data from TPM FIFO.  <a href="#aae1089233ca34dffe91aee8b4c7756fe">More...</a><br/></td></tr>
<tr class="separator:aae1089233ca34dffe91aee8b4c7756fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a665e7d79cc5cfe51b6a6bd2c45fe33f6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#a665e7d79cc5cfe51b6a6bd2c45fe33f6">SpiPsTpmFifoWrite</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiPtr, u8 *DataPtr, u8 ByteCount)</td></tr>
<tr class="memdesc:a665e7d79cc5cfe51b6a6bd2c45fe33f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function write the data TPM FIFO.  <a href="#a665e7d79cc5cfe51b6a6bd2c45fe33f6">More...</a><br/></td></tr>
<tr class="separator:a665e7d79cc5cfe51b6a6bd2c45fe33f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6c12da3b0c9e3bc49ee620bd6d78e91"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#ae6c12da3b0c9e3bc49ee620bd6d78e91">SpiPsTpmTransfer</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiPtr, u32 Address, u8 *TxBuf, u8 *RxBuf, u16 Length)</td></tr>
<tr class="memdesc:ae6c12da3b0c9e3bc49ee620bd6d78e91"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets TPM access configuration.  <a href="#ae6c12da3b0c9e3bc49ee620bd6d78e91">More...</a><br/></td></tr>
<tr class="separator:ae6c12da3b0c9e3bc49ee620bd6d78e91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb7d7d27c1b57f947c6fe9c9f631e98f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#adb7d7d27c1b57f947c6fe9c9f631e98f">SpiPsTpmDataTransfer</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiPtr, u8 *TxBuf, u8 *RxBuf, u16 Txlen)</td></tr>
<tr class="memdesc:adb7d7d27c1b57f947c6fe9c9f631e98f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets TPM access configuration.  <a href="#adb7d7d27c1b57f947c6fe9c9f631e98f">More...</a><br/></td></tr>
<tr class="separator:adb7d7d27c1b57f947c6fe9c9f631e98f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a2394ba0577e0c87e429c0f15cedb9b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#a9a2394ba0577e0c87e429c0f15cedb9b">SpiPsTpmPolledExample</a> (<a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *SpiInstancePtr, u16 SpiDeviceId)</td></tr>
<tr class="separator:a9a2394ba0577e0c87e429c0f15cedb9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xspips__tpm__polled__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function to call the Spi TPM example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function to call the Spi TPM example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None </dd></dl>

<p>References <a class="el" href="xspips__tpm__polled__example_8c.html#a9a2394ba0577e0c87e429c0f15cedb9b">SpiPsTpmPolledExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a14aaa93ae5aa83badddfb375e66a7c6e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsReadID </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiPtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function reads vendor identification information. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiPtr</td><td>is a pointer to the SPIPS driver component to use.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xspips__tpm__polled__example_8c.html#ae6c12da3b0c9e3bc49ee620bd6d78e91">SpiPsTpmTransfer()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#a9a2394ba0577e0c87e429c0f15cedb9b">SpiPsTpmPolledExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a5859038bd418dcf96c9e3421023bb31d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsTpmAccessGet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>AccessPtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function gets TPM access configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiPtr</td><td>is a pointer to the SPIPS driver component to use. </td></tr>
    <tr><td class="paramname">AccessPtr</td><td>is pointer to get access configuration</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xspips__tpm__polled__example_8c.html#ae6c12da3b0c9e3bc49ee620bd6d78e91">SpiPsTpmTransfer()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#a9a2394ba0577e0c87e429c0f15cedb9b">SpiPsTpmPolledExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a3b9ebbd5db2404596e8b66443ad5bd17"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsTpmAccessSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>Access</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets TPM access configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiPtr</td><td>is a pointer to the SPIPS driver component to use. </td></tr>
    <tr><td class="paramname">Access</td><td>is set access configuration value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xspips__tpm__polled__example_8c.html#ae6c12da3b0c9e3bc49ee620bd6d78e91">SpiPsTpmTransfer()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#a9a2394ba0577e0c87e429c0f15cedb9b">SpiPsTpmPolledExample()</a>.</p>

</div>
</div>
<a class="anchor" id="adb7d7d27c1b57f947c6fe9c9f631e98f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsTpmDataTransfer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>TxBuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>RxBuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>Txlen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets TPM access configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiPtr</td><td>is a pointer to the SPIPS driver component to use. </td></tr>
    <tr><td class="paramname">TxBuf</td><td>is pointer to transmit buffer </td></tr>
    <tr><td class="paramname">RxBuf</td><td>is pointer to receive buffer </td></tr>
    <tr><td class="paramname">Txlen</td><td>is data transfer length</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xspips__tpm__polled__example_8c.html#aae1089233ca34dffe91aee8b4c7756fe">SpiPsTpmFifoRead()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#a665e7d79cc5cfe51b6a6bd2c45fe33f6">SpiPsTpmFifoWrite()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#abf6b46685d48c16faabf01f702d2cec8">SpiPsTpmStatusGet()</a>, and <a class="el" href="xspips__tpm__polled__example_8c.html#ad4fe32c1f6365d4586448ea929b5282d">SpiPsTpmStatusSet()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#a9a2394ba0577e0c87e429c0f15cedb9b">SpiPsTpmPolledExample()</a>.</p>

</div>
</div>
<a class="anchor" id="aae1089233ca34dffe91aee8b4c7756fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsTpmFifoRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>DataPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ByteCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function reads data from TPM FIFO. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiPtr</td><td>is a pointer to the SPIPS driver component to use. </td></tr>
    <tr><td class="paramname">Data</td><td>is to be read to data FIFO </td></tr>
    <tr><td class="paramname">ByteCount</td><td>is the number of bytes to read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xspips__tpm__polled__example_8c.html#ae6c12da3b0c9e3bc49ee620bd6d78e91">SpiPsTpmTransfer()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#adb7d7d27c1b57f947c6fe9c9f631e98f">SpiPsTpmDataTransfer()</a>.</p>

</div>
</div>
<a class="anchor" id="a665e7d79cc5cfe51b6a6bd2c45fe33f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsTpmFifoWrite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>DataPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ByteCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function write the data TPM FIFO. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiPtr</td><td>is a pointer to the SPIPS driver component to use. </td></tr>
    <tr><td class="paramname">DataPtr</td><td>is data pointer to be written to FIFO. </td></tr>
    <tr><td class="paramname">ByteCount</td><td>is the number of bytes to read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xspips__tpm__polled__example_8c.html#ae6c12da3b0c9e3bc49ee620bd6d78e91">SpiPsTpmTransfer()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#adb7d7d27c1b57f947c6fe9c9f631e98f">SpiPsTpmDataTransfer()</a>.</p>

</div>
</div>
<a class="anchor" id="a9a2394ba0577e0c87e429c0f15cedb9b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsTpmPolledExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>SpiDeviceId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiInstancePtr</td><td>is a pointer to the Spi Instance. </td></tr>
    <tr><td class="paramname">SpiDeviceId</td><td>is the Device Id of Spi.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>

<p>References <a class="el" href="struct_x_spi_ps___config.html#a9b11063c0ae635e0284463e9edf0fdf8">XSpiPs_Config::BaseAddress</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#a14aaa93ae5aa83badddfb375e66a7c6e">SpiPsReadID()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#a5859038bd418dcf96c9e3421023bb31d">SpiPsTpmAccessGet()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#a3b9ebbd5db2404596e8b66443ad5bd17">SpiPsTpmAccessSet()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#adb7d7d27c1b57f947c6fe9c9f631e98f">SpiPsTpmDataTransfer()</a>, <a class="el" href="group__spips.html#gabfabf86279474d10c04bfe97f3386a64">XSpiPs_CfgInitialize()</a>, <a class="el" href="group__spips.html#ga46beb1bbc0f69b94eba21c4e9495c8f9">XSPIPS_CLK_PRESCALE_16</a>, <a class="el" href="group__spips.html#gaf0a0da0e20b70ee21a3998117785638e">XSPIPS_FORCE_SSELECT_OPTION</a>, <a class="el" href="group__spips.html#ga70c86f3842f5996d9d7fc874466f4136">XSpiPs_LookupConfig()</a>, <a class="el" href="group__spips.html#ga7e6e32f2a23f47aa9f69c6adccbd2ba3">XSPIPS_MANUAL_START_OPTION</a>, <a class="el" href="group__spips.html#ga1fbe2203de88e79aa3a6c7e70e2f3436">XSPIPS_MASTER_OPTION</a>, <a class="el" href="group__spips.html#gaaa797b9b8184e6f39b0c0038553e48d8">XSpiPs_SelfTest()</a>, <a class="el" href="group__spips.html#ga146ed84d7a6ab3b3f8961697bd78da60">XSpiPs_SetClkPrescaler()</a>, <a class="el" href="group__spips.html#ga4f14bfc3ddd296adb08843dbbe30a306">XSpiPs_SetOptions()</a>, and <a class="el" href="group__spips.html#ga1ef5af2211095df5692567fa4721a8d5">XSpiPs_SetSlaveSelect()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="abf6b46685d48c16faabf01f702d2cec8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsTpmStatusGet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>StatusPtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function gets TPM status. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiPtr</td><td>is a pointer to the SPIPS driver component to use. </td></tr>
    <tr><td class="paramname">StatusPtr</td><td>is pointer to read status</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xspips__tpm__polled__example_8c.html#ae6c12da3b0c9e3bc49ee620bd6d78e91">SpiPsTpmTransfer()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#adb7d7d27c1b57f947c6fe9c9f631e98f">SpiPsTpmDataTransfer()</a>.</p>

</div>
</div>
<a class="anchor" id="ad4fe32c1f6365d4586448ea929b5282d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsTpmStatusSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>StatusVal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets the TPM status. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiPtr</td><td>is a pointer to the SPIPS driver component to use. </td></tr>
    <tr><td class="paramname">StatusVal</td><td>is to be written to status register</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xspips__tpm__polled__example_8c.html#ae6c12da3b0c9e3bc49ee620bd6d78e91">SpiPsTpmTransfer()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#adb7d7d27c1b57f947c6fe9c9f631e98f">SpiPsTpmDataTransfer()</a>.</p>

</div>
</div>
<a class="anchor" id="ae6c12da3b0c9e3bc49ee620bd6d78e91"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SpiPsTpmTransfer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_spi_ps.html">XSpiPs</a> *&#160;</td>
          <td class="paramname"><em>SpiPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>TxBuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>RxBuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>Length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets TPM access configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SpiPtr</td><td>is a pointer to the SPIPS driver component to use. </td></tr>
    <tr><td class="paramname">Address</td><td>register address </td></tr>
    <tr><td class="paramname">TxBuf</td><td>is pointer to transmit buffer </td></tr>
    <tr><td class="paramname">RxBuf</td><td>is pointer to receive buffer </td></tr>
    <tr><td class="paramname">Length</td><td>is transfer length</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, else XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="group__spips.html#ga94490f99431c92c2a9a54cc41d4abe71">XSpiPs_PolledTransfer()</a>.</p>

<p>Referenced by <a class="el" href="xspips__tpm__polled__example_8c.html#a14aaa93ae5aa83badddfb375e66a7c6e">SpiPsReadID()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#a5859038bd418dcf96c9e3421023bb31d">SpiPsTpmAccessGet()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#a3b9ebbd5db2404596e8b66443ad5bd17">SpiPsTpmAccessSet()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#aae1089233ca34dffe91aee8b4c7756fe">SpiPsTpmFifoRead()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#a665e7d79cc5cfe51b6a6bd2c45fe33f6">SpiPsTpmFifoWrite()</a>, <a class="el" href="xspips__tpm__polled__example_8c.html#abf6b46685d48c16faabf01f702d2cec8">SpiPsTpmStatusGet()</a>, and <a class="el" href="xspips__tpm__polled__example_8c.html#ad4fe32c1f6365d4586448ea929b5282d">SpiPsTpmStatusSet()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
